
<?php

use yii\helpers\Html;
use yii\bootstrap\ActiveForm;
use kartik\select2\Select2;
use yii\web\Session;

/* 修改个人信息  */
$this->title = '修改个人信息';

$session = new Session;
$session->open();
$member  = $session->get('member');

?>



<style type="text/css">
	.mui-bar{background-color:#4EB1D8;}
	.mui-title{color: #FFF;}
	.mui-table-view {margin-top: 20px;}
	.update{font-style: normal;font-size: 15px;margin-right: -25px;}
	.mui-table-view-cell:after{left:0}
	.mui-btn-block{padding: 5px 0px;}
	.text-center{text-align: center;}
    .mui-input-group .mui-input-row:after{left: 0}
    .mui-bar-transparent{top:0;background-color:rgba(247,247,247,0);-webkit-box-shadow:none;box-shadow:none}

    .help-block.help-block-error{color: red;text-align: center;}
    .has-error input{border: 1px solid red !important;}
    #forgetPassword{color: #626262;}
    .mui-input-group:before{background-color:#efeff4;}
    .mui-input-group:after{background-color:#efeff4;}
    #member-gender{background-color: #FFF;}
    #member-city{border:1px solid #ddd !important;border-radius: 0;}
    .mui-btn-primary{background-color:rgb(41, 167, 226);border:1px solid rgb(41, 167, 226); }
    .mui-checkbox input[type=checkbox]:checked:before, .mui-radio input[type=radio]:checked:before{color: rgb(41, 167, 226);}
</style>

<script type="text/javascript">
var getId=localStorage.getItem("phone");
var Id = "<?=$model->phone?>";
if(getId != Id){
	window.location.href='/member/member/login'; 
}
</script>


<div class="mui-content mui-scroll-wrapper">

	<div class="mui-scroll">
		<div class="mui-row">
				<div class="mui-col-xs-12" style="text-align: center;margin-top:40px;">
					<img src="/img/login.png" style="width:80%;" >
				</div>	
		</div>
		<div class="mui-row" style="margin-top: 1rem;">
			<div class="mui-col-xs-12" style="width: 90%;margin-left: 5%" >
			<?php $form = ActiveForm::begin([]); ?>
			<div class="mui-input-group mui-input-row" style="background-color: #efeff4;">
				<div class="mui-row">
					<div class="mui-col-xs-3" style="line-height: 45px">手机号</div>
					<div class="mui-col-xs-9">	
					<?= $form->field($model, 'phone')->textInput(['maxlength' => true,'style'=>'width:100%;background-color:#ddd;border:1px solid #ddd;','type'=>'number','class'=>'mui-input-clear','disabled'=>'disabled'])->label(false) ?>
					</div>
				</div>
			</div>
			<div class="mui-input-group mui-input-row" style="background-color: #efeff4;">
				<div class="mui-row">
					<div class="mui-col-xs-3" style="line-height: 45px">姓名</div>
					<div class="mui-col-xs-9">	
					<?= $form->field($model, 'name')->textInput(['maxlength' => 5,'style'=>'width:100%;background-color:#FFF;border:1px solid #ddd;','class'=>'mui-input-clear'])->label(false) ?>
					</div>
				</div>	
			</div>
			<div class="mui-input-group mui-input-row" style="background-color: #efeff4;">
				<div class="mui-row">
					<div class="mui-col-xs-3" style="line-height: 45px">邮箱</div>
					<div class="mui-col-xs-9">	
				 	<?= $form->field($model, 'mail')->textInput(['maxlength' => true,'style'=>'width:100%;background-color:#FFF;border:1px solid #ddd;','class'=>'mui-input-clear'])->label(false) ?>
				 	</div>
				</div>	
			</div>
			<div class="mui-input-group mui-input-row" style="background-color: #efeff4;">
				<div class="mui-row">
					<div class="mui-col-xs-3" style="line-height: 45px">公司名称</div>
					<div class="mui-col-xs-9">	
				<?= $form->field($model, 'company')->textInput(['maxlength' => 25,'style'=>'width:100%;background-color:#FFF;border:1px solid #ddd;','class'=>'mui-input-clear'])->label(false) ?>
					</div>
				</div>	
			</div>
			
			<div class="mui-input-group mui-input-row mui-radio" style="background-color: #efeff4;">
				<div class="mui-row">
					<div class="mui-col-xs-3" style="line-height: 45px">性别</div>
					<div class="mui-col-xs-9">	
						<div class="mui-row" style="background-color: #FFF;">
				 <?= $form->field($model, 'gender')->error(false)->radioList([1=>'男', 2=>'女'],[
                                'item' => function($index, $label, $name, $checked, $value) {
                                    $return = '<div class="mui-col-xs-6" style="float:left"><div class="mui-input-row mui-radio mui-left">';
                                    $return .= '<label>';
                                    $return .= ucwords($label);
                                    $return .= '</label>';
                                    $return .= '<input type="radio" name="' . $name . '" value="' . $value . '" '.($checked?'checked':'').'>';
                                    $return .= '</div></div>';
                                    return $return;
                                }
                            ])->label(false) ?>
                         </div>   
                 	</div>
				</div>	           
				
			</div>
			<div class="mui-col-xs-12" style="margin-top: 1rem">	
				<?= Html::submitButton('提 交' , ['class'=>'mui-btn mui-btn-block mui-btn-primary']) ?>
			</div>
				
		 <?php ActiveForm::end(); ?>
		 	</div>	
		</div>	
	</div>
</div>

<?=  yii\web\View::registerJsFile("/mui/js/mui.picker.min.js",['depends' => 'app\assets\MuiAsset']) ?>
<?php app\components\JsBlock::begin() ?>
<script type="text/javascript">

mui.init();
mui('body').on('tap','a[data-link="as"]',function(){document.location.href=this.href;});
mui('.mui-scroll-wrapper').scroll({
  deceleration: 0.0005 //flick 减速系数，系数越大，滚动速度越慢，滚动距离越小，默认值0.0006
});		

</script>
<?php app\components\JsBlock::end() ?>



